package api.dialogs;

import java.awt.BorderLayout;
import java.awt.Font;

import javax.swing.GroupLayout;
import javax.swing.GroupLayout.Alignment;
import javax.swing.JButton;
import javax.swing.JDialog;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;


public class AvisoInitDialog extends JDialog {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private final JPanel contentPanel = new JPanel();
	public JButton btnAceptar;
	public JLabel lbldim;
	public JLabel labelini;
	public JLabel labelfin;

	/**
	 * Launch the application.
	 */
	public static void main(String[] args) {
		try {
			AvisoInitDialog dialog = new AvisoInitDialog();
			dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
			dialog.setVisible(true);
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

	/**
	 * Create the dialog.
	 */
	public AvisoInitDialog() {
		setUndecorated(true);
		setTitle("Obstaculos aleatorios");
		setModal(true);
		setBounds(100, 100, 296, 238);
		getContentPane().setLayout(new BorderLayout());
		contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5));
		getContentPane().add(contentPanel, BorderLayout.CENTER);
		
		JLabel lbl1 = new JLabel("Posicion final del robot:");
		lbl1.setFont(new Font("Lucida Grande", Font.PLAIN, 12));
		
		JLabel lbl2 = new JLabel("Posicion inicial del robot:");
		lbl2.setToolTipText("");
		lbl2.setFont(new Font("Lucida Grande", Font.PLAIN, 12));
		
		JPanel panel = new JPanel();
		
		JLabel lblDimensiones = new JLabel("Dimensiones del tablero:");
		lblDimensiones.setFont(new Font("Lucida Grande", Font.PLAIN, 12));
		
		lbldim = new JLabel("");
		lbldim.setFont(new Font("Lucida Grande", Font.BOLD, 12));
		
		labelini = new JLabel("");
		labelini.setFont(new Font("Lucida Grande", Font.BOLD, 12));
		
		labelfin = new JLabel("");
		labelfin.setFont(new Font("Lucida Grande", Font.BOLD, 12));
		GroupLayout gl_contentPanel = new GroupLayout(contentPanel);
		gl_contentPanel.setHorizontalGroup(
			gl_contentPanel.createParallelGroup(Alignment.LEADING)
				.addGroup(gl_contentPanel.createSequentialGroup()
					.addGroup(gl_contentPanel.createParallelGroup(Alignment.LEADING)
						.addGroup(gl_contentPanel.createSequentialGroup()
							.addGap(32)
							.addGroup(gl_contentPanel.createParallelGroup(Alignment.LEADING)
								.addGroup(gl_contentPanel.createSequentialGroup()
									.addComponent(lblDimensiones)
									.addGap(18)
									.addComponent(lbldim, GroupLayout.PREFERRED_SIZE, 56, GroupLayout.PREFERRED_SIZE))
								.addGroup(gl_contentPanel.createSequentialGroup()
									.addGroup(gl_contentPanel.createParallelGroup(Alignment.LEADING)
										.addComponent(lbl2)
										.addComponent(lbl1))
									.addGap(18)
									.addGroup(gl_contentPanel.createParallelGroup(Alignment.LEADING)
										.addComponent(labelini, GroupLayout.PREFERRED_SIZE, 49, GroupLayout.PREFERRED_SIZE)
										.addComponent(labelfin)))))
						.addGroup(gl_contentPanel.createSequentialGroup()
							.addGap(92)
							.addComponent(panel, GroupLayout.PREFERRED_SIZE, 97, GroupLayout.PREFERRED_SIZE)))
					.addContainerGap(36, Short.MAX_VALUE))
		);
		gl_contentPanel.setVerticalGroup(
			gl_contentPanel.createParallelGroup(Alignment.LEADING)
				.addGroup(gl_contentPanel.createSequentialGroup()
					.addContainerGap()
					.addComponent(panel, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
					.addGap(31)
					.addGroup(gl_contentPanel.createParallelGroup(Alignment.BASELINE)
						.addComponent(lblDimensiones)
						.addComponent(lbldim, GroupLayout.PREFERRED_SIZE, 15, GroupLayout.PREFERRED_SIZE))
					.addGap(18)
					.addGroup(gl_contentPanel.createParallelGroup(Alignment.BASELINE)
						.addComponent(lbl2, GroupLayout.PREFERRED_SIZE, 16, GroupLayout.PREFERRED_SIZE)
						.addComponent(labelini))
					.addGap(18)
					.addGroup(gl_contentPanel.createParallelGroup(Alignment.BASELINE)
						.addComponent(lbl1)
						.addComponent(labelfin))
					.addContainerGap(35, Short.MAX_VALUE))
		);
		
		JLabel lblAviso = new JLabel("AVISO");
		lblAviso.setFont(new Font("Lucida Grande", Font.BOLD, 20));
		panel.add(lblAviso);
		contentPanel.setLayout(gl_contentPanel);
		
		JPanel buttonPanel = new JPanel();
		getContentPane().add(buttonPanel, BorderLayout.SOUTH);
		btnAceptar = new JButton("Aceptar");
		btnAceptar.setFont(new Font("Lucida Grande", Font.PLAIN, 11));
		buttonPanel.add(btnAceptar);
	}
}
